package com.ticket.service.impl;

import com.ticket.dao.HallDao;
import com.ticket.entity.Hall;
import com.ticket.service.HallService;
import com.ticket.util.MybatisUtil;
import com.ticket.util.Page;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author lixin
 * @version 8.0
 * @description TODO
 * @date 2023/10/12
 */
public class HallServiceImpl implements HallService {
    static HallDao dao=null;
    static {
        SqlSession sqlSession= MybatisUtil.getSqlSession();
        dao=sqlSession.getMapper(HallDao.class);
    }

    @Override
    public int selHallPageCount() {
        return 0;
    }

    @Override
    public List<Hall> showHallpage(Page page, Hall hall) {
        List<Hall> hallList= dao.showHallpage(page,hall);
        int count= dao.selHallPageCount();
        page.setTotalCount(count);
        page.setDataList(hallList);
        return hallList;
    }

    @Override
    public int addHall(Hall hall) {
        return 0;
    }

    @Override
    public int updHall(Hall hall) {
        return 0;
    }

    @Override
    public int delHall(Hall hall) {
        return 0;
    }

    @Override
    public List<Hall> selHallName(Hall hall) {
        return null;
    }
}
